﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<MiserBlogData.Entities.UserVIP>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Discussion List</h2>

    <table>
        <tr>
            <th style="width:350px">
                Title
            </th>
            <th style="width:80px">
                Visits
            </th>
            <th style="width:80px">
                State
            </th>
            <th style="width:100px">
                CDate
            </th>
            <th style="width:100px">
                UDate
            </th>
            <th style="width:150px"></th>
        </tr>

    <% foreach (var item in Model.ArticleList) { %>
    
        <tr>
            <td>
                <%= item.Title %>
            </td>
            <td>
                <%= item.Visits %> 
            </td>
            <td>
                <%= item.State %>
            </td>
            <td>
                <%= item.CDate.ToString("yyyy-MM-dd")%>
            </td>
            <td>
                <%= item.UDate.ToString("yyyy-MM-dd")%>
            </td>
            <td>
                <%= Html.ActionLink("Edit", "Create", new { id = item.Id, controller = "ManageArticle" })%> |
                <%= Html.ActionLink("Details", "Index", new { id = item.Id, controller="Article" })%> |
                <%= Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })%>
            </td>
        </tr>
    
    <% } %>

    </table>

</asp:Content>

